#pragma once
#include <vector>
using std::vector;
#include "Channel.h"

const int CHANNEL_PAGE_SIZE = 7;
//typedef vector<Channel> ChannelPage;

class ChannelPage : public vector<Channel*>{
public:
	int ChannelCount;
	
	ChannelPage():ChannelCount(0){

	}
};


class ChannelPool
{
public:
	ChannelPool(void);
	~ChannelPool(void);
public:
	ChannelPage * getCurrentPage(){
		return m_pages[m_pageIndex];
	}
	ChannelPage * getNextPage(){
		if(++m_pageIndex > 2) m_pageIndex = 0;
		return m_pages[m_pageIndex];
	}
	ChannelPage * getPrevPage(){
		if(--m_pageIndex < 0) m_pageIndex = 2;
		return m_pages[m_pageIndex];
	}
private:
	ChannelPage m_page0;
	ChannelPage m_page1;
	ChannelPage m_page2;	
	ChannelPage * m_pages[3];
	int m_pageIndex;	
};

extern ChannelPool g_channelPool;